package com.yangjun.common.enums.report;

public enum ReportTemplateTypeEnum {
	
	
	barCode("barCode","按条形码搜索模板"),
	wareName("wareName","按商品名称搜索模板"),
	batchno("batchno","按批号搜索模板"),
	wareCode("wareCode","按商品编码搜索模板"),
	registrationnumber("registrationnumber","按批准文号搜索模板"),
	clientName("clientName","按客户昵称搜索模板"),
	clientCode("clientCode","按客户编码搜索模板"),
	departmentName("departmentName","按回访科室搜索模板"),
	loginName("loginName","按跟进客服搜索模板"),
	lastWareCode("lastWareCode","按末次商品编码搜索模板"),
	activeCode("activeCode","按活动编码搜索模板"),
	activeName("activeName","按活动名称搜索模板"),
	department("department","按科室搜索模板"),
	manufacturer("manufacturer","按生厂厂家搜索模板"),
	shop("shop","按店铺搜索模板"),
	orderchannel("orderchannel","按下单渠道搜索模板"),
	ordercode("ordercode","按订单编码搜索模板"),
	thirdOrdercode("thirdOrdercode","按第三方订单号搜索模板"),
	trackcode("trackcode","按快递单号搜索模板"),
	packagecode("packagecode","按包裹号搜索模板"),
	buyer("buyer","按下单人搜索模板"),
	returncode("returncode","按退货单号搜索模板"),
	providername("providername","按供应商搜索模板");
	
	private String code;
	private String template;
	
	
	public String getCode() {
		return code;
	}


	public void setCode(String code) {
		this.code = code;
	}


	public String getTemplate() {
		return template;
	}


	public void setTemplate(String template) {
		this.template = template;
	}

	private ReportTemplateTypeEnum(String code, String template) {
		this.code = code;
		this.template = template;
	}


	public static String getTemplate(String code){
		String template = null ;
		for(ReportTemplateTypeEnum reportTemplateTypeEnum : ReportTemplateTypeEnum.values()){
			if(reportTemplateTypeEnum.getCode().equals(code)){
				template = reportTemplateTypeEnum.getTemplate();
			}
		}
		return template;
	}
	public static String getTemplateName(String code){
		String template = null ;
		for(ReportTemplateTypeEnum reportTemplateTypeEnum : ReportTemplateTypeEnum.values()){
			if(reportTemplateTypeEnum.getCode().equals(code)){
				template = reportTemplateTypeEnum.getTemplate().replaceAll("按","").replaceAll("搜索模板","");
			}
		}
		return template;
	}
}
